const routes = [
  {
    path: '/',
    redirect: '/main'
  },
  {
    name: 'login',
    path: '/login', //   @ts-ignore
    component: () => import('@/views/login/Login.vue'),
    meta: {
      title: '登录界面'
    }
  },
  {
    path: '/main', //   @ts-ignore
    name: 'main',
    component: () => import('@/views/main/Main.vue'),
    children: [
      {
        path: '/main',
        redirect: '/main/intro'
      }
      /*     {
        path: 'intro', //@ts-ignore
        component: () => import('@/views/main/intro/Index.vue'),
        children: [
          {
            path: '/main/intro',
            redirect: '/main/intro/overview'
          },
          {
            path: 'overview', //ts-ignore
            component: () => import('@/views/main/intro/Overview.vue')
          },
          {
            path: 'dashboard',
            component: () => import('@/views/main/intro/Dashboard.vue')
          }
        ]
      },
      {
        path: 'system',
        component: () => import('@/views/main/system/Index.vue'),
        children: [
          {
            path: '/main/system',
            redirect: '/main/system/user'
          },
          {
            path: 'user',
            component: () => import('@/views/main/system/User.vue')
          },
          {
            path: 'depart',
            component: () => import('@/views/main/system/Depart.vue')
          },
          {
            path: 'menu',
            component: () => import('@/views/main/system/Menu.vue')
          },
          {
            path: 'role',
            component: () => import('@/views/main/system/Role.vue')
          }
        ]
      },
      {
        path: 'goods',
        component: () => import('@/views/main/goods/Index.vue'),
        children: [
          {
            path: '/main/goods',
            redirect: '/main/goods/classify'
          },
          {
            path: 'classify',
            component: () => import('@/views/main/goods/Classify.vue')
          },
          {
            path: 'info',
            component: () => import('@/views/main/goods/Info.vue')
          }
        ]
      },
      {
        path: 'tale',
        component: () => import('@/views/main/tale/Index.vue'),
        children: [
          {
            path: '/main/tale',
            redirect: '/main/tale/stories'
          },
          {
            path: 'stories',
            component: () => import('@/views/main/tale/Stories.vue')
          },
          {
            path: 'talelist',
            component: () => import('@/views/main/tale/Talelist.vue')
          }
        ]
      } */
    ]
  },
  {
    //   匹配任意路径信息
    path: '/:pathMatch(.*)*', //   @ts-ignore
    component: () => import('@/views/error/Error.vue')
  }
]

export default routes
